<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="">
<head>
    <meta charset="UTF-8">
    <title>协议管理</title>
    <link href="../../resources/css/common/bootstrap3.min.css" rel="stylesheet" type="text/css" />
    <link href="../../resources/css/common/datetimepicker.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/common/page.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../../resources/css/common/component.css" />
    <link rel="Bookmark" href="../../resources/img/login/icon.png" >
    <link rel="Shortcut Icon" href="../../resources/img/login/icon.png" />
</head>
<!--<link rel="import" href="/html/common/common_list.html" >-->
<div class="container body-content">
    <div id="demo">
        <div class="form-inline" style="margin:2% 0">
            <div class="form-group">
                <a class="btn btn-primary btn-sm"  href="/html/agreement/addagreement.html" >添加协议</a>
            </div>
        </div>


        <div class="form-group">
            <table class="table table-bordered table-responsive table-striped">
                <thead>
                <tr>
                    <th v-for="(value, key) in gridColumns"  v-cloak>
                            {{ key | capitalize }}
                    </th>
                </tr>
                </thead>
                <tr v-for="entry in gridData" v-cloak>
                    <td v-for="(value, key) in gridColumns">
                        <div v-if="key=='type'" v-model="entry[key]">
                            <span  v-if="entry['type']==1">登陆注册协议<br></span>
                            <span  v-else-if="entry['type']==2">入住协议<br></span>
                        </div>
                        <div v-else-if="key=='oper'">
                            <button type="button" class="btn btn-danger"   @click="getAgreementDetail(entry['type'])" >详情</button>
                        </div>
                        <div v-else>
                            <div v-html="showHtml(entry[key],value)"></div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
            </div>
        </div>


    </div>
    <hr />
    <footer>
    </footer>
</div>

<div id="app">
    <page></page>
</div>

</body>
<script type="text/javascript" src="../../resources/js/common/jquery-2.1.1.min.js"></script>
<script src="../../resources/js/common/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="../../resources/js/common/bootstrap3.min.js" type="text/javascript"></script>
<script src="../../resources/js/common/vue.min.js"></script>
<script src="../../resources/js/common/load_list.js"></script>
<script src="../../resources/js/common/common.js"></script>
<script>
    //默认数据
    var runUrl='/backend/agreement/agreementList';
    var data={};
    //列表th信息
    //列表th信息
    data['th']={'id':'id', 'type':'类型','createTime':'创建时间','oper':'操作'};
    //列表字段信息以及类型  类型 video vioce img a no 五种
    data['gridColumns'] = {'id':'no', 'type':'no','createTime':'no','oper':'操作'};
</script>
<script>
    function getAgreementDetail(type) {
        window.location.href = "/html/agreement/agreementdetail.html?type="+type;
    }
</script>
</html>

